﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using VietThinks.Contract;

namespace VietThinks.Website
{
    public class ServiceProvider
    {
        private static readonly global::VietThinks.Contract.IServiceProvider current = global::VietThinks.Service.ServiceProvider.Instance;

        public static TService GetService<TService>()
            where TService : class
        {
            return current.GetService<TService>();
        }

        public static object GetServiceByType(Type serviceType)
        {
            return current.GetService(serviceType);
        }

        static ServiceProvider()
        {
            AuthenticationService = new AuthenticationService();
        }

        public static AuthenticationService AuthenticationService { get; private set; }
    }
}